<script language="Javascript">
	
	function updateMenuTargetDivs(menuId, menuType)
	{
		//alert("update! "+menuId+", "+menuType);
		
		for(var type=1; type<=4; type++)
		{
			if(type == menuType)
				Element.classNames($('m'+menuId+'_type_'+type)).remove('hidden');
			else
				Element.classNames($('m'+menuId+'_type_'+type)).add('hidden');
		}

		_updatePopupControlls(menuId, menuType);
	}

	function _updatePopupControlls(menuId, menuType)
	{
		if(menuType == 4 || menuType == 0)
		{
			Element.classNames($('m'+menuId+'_popupcontrolls')).add('hidden');
			Element.classNames($('m'+menuId+'_popupcontrolls2')).add('hidden');
		}
		else
		{
			if(typeof updatePopupControlls == "function")
			{
				// jelen van extra fuggveny, az fut!
				updatePopupControlls(menuId, menuType);
			}
			else
			{
				Element.classNames($('m'+menuId+'_popupcontrolls')).remove('hidden');
				Element.classNames($('m'+menuId+'_popupcontrolls2')).remove('hidden');
			}
		}
	}

	function userMadeBrowserSelection(browserId, selectionParam) {
		//alert("browser: "+browserId+", selection: "+selectionParam);

		var inputObj = getElementWithId(browserId);
		if(inputObj)
			inputObj.value = selectionParam;

		var imgObj = getElementWithId(browserId+'_img');
		if (imgObj)
			imgObj.src = selectionParam;
		
	}

	function removeMenuPicture(id, isActive)
	{
		var inputObj;
		var imgObj;
		
		if (isActive == 1) {
			inputObj = getElementWithId('br_menupic_active_'+id);
			imgObj = getElementWithId('br_menupic_active_'+id+'_img');
		} else {
			inputObj = getElementWithId('br_menupic_'+id);
			imgObj = getElementWithId('br_menupic_'+id+'_img');
		}
		
		if(inputObj)
			inputObj.value = "";

		if (imgObj)
			imgObj.src = 'images/noimage.jpg';
	}
	
	var getArticleTitleXmlUrl = '{getArticleTitleXmlUrl}';

	function userMadeBrowserSelection(browserId, selectionParam) {
		// do nothing
		if(browserId.substr(0, 5) == 'menu_') {
			var menuId = browserId.split('_')[1];
			var articleId = selectionParam.split(':')[3];
			$('menuform_' + menuId).article_id.value = articleId;
			getArticleTitleXml(getArticleTitleXmlUrl, menuId, articleId);
		}
	}

	function openFilesBrowser(menuId) {
		var browserUrl = '{link_menu_article_browser}';
		browserUrl = browserUrl.replace(/%_menuid%/, menuId);
		openBrowserWindow(browserUrl);
		//window.open(browserUrl, '_blank', 'width=1000,height=600,screenX=20,screenY=20,left=20,top=20,status=no,menubar=no,scrollbars=yes,resizable=yes,personalbar=no,location=no,toolbar=no,fullscreen=no');
		return false;
	}
	
</script>


{m_comment}<br/>
<br/>

{TREE}